package cn.wolfcode.trip.base.query;

import lombok.*;
import org.springframework.util.StringUtils;

@Setter
@Getter@AllArgsConstructor
@NoArgsConstructor@ToString
public class QueryObject {
   private int currentPage = 1;
   private int pageSize = 3;
   private String keyword;
    private String orderBy;
   public String getKeyword(){
       return StringUtils.hasLength(keyword)? keyword:null;
   }
   public Integer getStart(){
       return (currentPage-1)*pageSize;
   }
}
